local unitName = "Aeveria_overlord"

local unitDef = 
{
-- Internal settings
	BuildPic = "Aeveria_overlord.png",
	Category = "MOBILE LAND SCOUT NOTHEAVY NOTAIR NOTSHIP NOTEPIC NOTSTEALTHY ALL",
	ObjectName = "PK_Aeveria_overlord.s3o",
	Side = "TANKS",
	TEDClass = "TANK",
	script = "PK_Aeveria_overlord_Script.lua",
iconType = "experimental",
	
-- Unit limitations and properties
	ActivateWhenBuilt = 1,
	BuildTime = 250000,
	Description = "The Aeveria Experimental",
	MaxDamage = 245000,
autoHeal=50,
	Name = "Aeveria Overlord",
	RadarDistance = 0,
	SightDistance = 800,
	SoundCategory = "TANK",
	Upright = 1,
	
-- Energy and metal related
	BuildCostEnergy = 341250,
buildCostMetal      = 30500,
	
-- Pathfinding and related
	Acceleration = 0.15,
	BrakeRate = 0.1,
	FootprintX = 17,
	FootprintZ = 17,
	MaxSlope = 10,
	MaxVelocity = 0.75,
	MaxWaterDepth = 300,
	TurnRate = 100,
	movementclass = "BotExperimental",

-- Abilities
	Builder = 0,
	Reclaimable = 0,
	CanAttack = 1,
	CanGuard = 1,
	CanMove = 1,
	CanPatrol = 1,
	LeaveTracks = 0,
	
-- Weapons and related
BadTargetCategory = "NOTAIR",
	ExplodeAs = "Experimental_death",
	SelfDestructAs = "Experimental_death",
	SelfDestructCountdown = 5,
    NoChaseCategory = "AIR",

weapons = {
        [1] = {
            def = "orangeblob",
	     onlyTargetCategory = [[LAND]],
        },

        [2] = {
            def = "railgun",
	     onlyTargetCategory = [[LAND]],
slaveTo=1,

        },

       [3]={
            def = "missile",
	     onlyTargetCategory = [[LAND]],
slaveTo=1,

	},

    },
}

local weaponDefs = {
    orangeblob = {
		name = "Quad Cannon",
		weapontype = "Cannon",
		accuracy = 10,
		areaofeffect = 50,
		avoidfeature = false,
		avoidfriendly = true,
		canattackground = true,
		collidefriendly = true,
		collisionsize = 8,
		commandfire = false,
		craterboost = 0,
		cratermult = 0,
		edgeeffectiveness = 0.1,
		explosionspeed = 256,
		impulseboost = 0,
		impulsefactor = 0,
		intensity = 1,
		noselfdamage = true,
		size = 3,
--        soundstart = "tank_fire",
        soundhit = "orangeblob_explo",
		range = 1600,
		reloadtime = 0.6,
		rgbcolor = "1.0 1.0 1.0",
		turret = true,
		texture1 = "flame",
		weaponvelocity = 1600,
		explosiongenerator = "custom:TANKGUN_FX",
		damage =
		{
			default = 1150,
		},
	},
 railgun = {
		name = "Railgun",
		weapontype = "Cannon",
		accuracy = 10,
		areaofeffect = 400,
		avoidfeature = false,
		avoidfriendly = true,
		canattackground = true,
		collidefriendly = true,
		collisionsize = 8,
		commandfire = false,
		craterboost = 0,
		cratermult = 0,
		edgeeffectiveness = 0.1,
		explosionspeed = 256,
		impulseboost = 0,
		impulsefactor = 0,
		intensity = 1,
		noselfdamage = true,
		size = 6,
--        soundstart = "tank_fire",
        soundhit = "lrpc_hit",
		range = 1600,
		reloadtime = 30,
		rgbcolor = "1.0 1.0 1.0",
		turret = true,
		texture1 = "flame",
		weaponvelocity = 1600,
		explosiongenerator = "custom:FLASHBIGBUILDINGEX",
		damage =
		{
			default = 7500,
		},
	},

missile = {
name="MLRS Pod",
weaponType=[[MissileLauncher]],

Accuracy=3300,

--Physic/flight path
range=2200,
reloadtime=10,
burst=10,
burstrate=0.1,
weaponVelocity=2400,
startVelocity=800,
weaponAcceleration=200,
flightTime=10,
BurnBlow=1,
FixedLauncher=true,
dance=1,--200
wobble=1000,
impulsefactor=0.001,
tolerance=8000,
tracks=false,
Turnrate=2200,
collideFriendly=true,
TrajectoryHeight = 0.7,
size=8,
InterceptedByShieldType=3,
        soundhit = "rockhvy3",
soundStart="rocket_fire2",


----APPEARANCE
model="Hobbes.s3o",
smokeTrail=true,
explosionGenerator="custom:CORE_KROGROCKET_EXPLOSION",

----TARGETING
turret=true,
CylinderTargetting=true,
avoidFeature=false,
avoidFriendly=true,
areaOfEffect=450,


--commandfire=true,

----DAMAGE
damage={
default=560,
},

	},


}


unitDef.weaponDefs = weaponDefs
return lowerkeys({ [unitName]  =  unitDef })


